[FLINK-32215] Correct date format for startupPosition in documentation #329
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reported on JIRA
The example string provided in the documentation does not actually parse. It causes an exception:
Unable to parse date string for startup position: 2020-02-01 04:15:00.00 Z; the date should conform to the pattern yyyy-MM-dd HH:mm:ss.SSS Z
The example string in the documentation should be changed from
2020-02-01 04:15:00.00 Z
to2020-02-01 04:15:00.000 +0000
I tested this in JShell first, based on the date format defined here.
Checking the date format in JShell
Then to verify I edited
statefun-flink/statefun-flink-io-bundle/src/test/resources/kafka-io-binders/routable-kafka-ingress-v1.yaml
to have various values then ranmvn clean install
while watching whetherRoutableKafkaIngressBinderV1Test
passed or failed.Setting `type` to `date` and `date` to `invaliddateformat` (test does not pass)
Setting `type` to `date` and `date` to the example date given in the documentation `2020-02-01 04:15:00.00 Z` (test does not pass)
Setting `type` to `date` and `date` to the corrected format `2020-02-01 04:15:00.000 -0000` (test passes)
Note that just adding an extra 0 is not sufficient, it causes
Unable to parse date string for startup position: 2020-02-01 04:15:00.000 Z; the date should conform to the pattern yyyy-MM-dd HH:mm:ss.SSS Z
. Despite the date format ending inZ
, the date must not end inZ
, it must end with an actual time zone (such as+0000
for UTC / Zulu time instead of theZ
shorthand).